using System;

namespace HumanElement.Xna.Construct
{
    /// <summary>
    /// <c>public interface IContentManager : IEntityManager<IAsset></c>
    /// </summary>
    public interface IContentManager : IEntityManager<IAsset>
    {
        /// <summary>
        /// Gets the content of the loaded.
        /// </summary>
        /// <value>The content of the loaded.</value>
        ILoadable[] LoadedContent { get; }

        /// <summary>
        /// Begins the load.
        /// </summary>
        /// <typeparam name="TAsset">The type of the asset.</typeparam>
        /// <param name="name">The name.</param>
        /// <param name="callback">The callback.</param>
        /// <returns></returns>
        bool BeginLoad<TAsset>(string name, Func<TAsset> callback);

        /// <summary>
        /// Ends the load.
        /// </summary>
        /// <returns></returns>
        bool EndLoad(bool cancel);

        /// <summary>
        /// Pres the load.
        /// </summary>
        /// <typeparam name="TAsset">The type of the asset.</typeparam>
        /// <param name="name">The name.</param>
        /// <param name="contentStore">The content store.</param>
        /// <returns></returns>
        TAsset PreLoad<TAsset>(string name, string contentStore);
    }    
}